from wtforms import StringField,PasswordField,SubmitField
from wtforms.validators import DataRequired,Length
from flask_wtf import FlaskForm

class LoginForm(FlaskForm):
    username = StringField(label='用户名',validators=[
        DataRequired('请填写用户名'),
        Length(min=6,max=50,message="用户名长度在6-50个字符之间")
    ])
    password = PasswordField(label='密码',validators=[
        DataRequired('请填写密码'),
        Length(min=6, max=50,message="密码长度在6-50个字符之间")
    ])
    submit = SubmitField(label='提交')